package com.example.backend.service;

import com.example.backend.mapper.OrderItemMapper;
import com.example.backend.model.OrderItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderItemService {
    @Autowired
    OrderItemMapper mapper;

    public OrderItem findOne(Integer id) {
        return mapper.findOne(id);
    }

    public List<OrderItem> findMatch(Integer orderid) {
        return mapper.findMatch(orderid);
    }

    public int insertOne(OrderItem item) {
        return mapper.insertOne(item);
    }

    public int deleteOne(Integer id) {
        return mapper.deleteOne(id);
    }

    public int updateOne(OrderItem item) {
        return mapper.updateOne(item);
    }
}
